libwebsockets: fix compilation with GCC 15
authorRosen Penev <[email protected]>
Sun, 13 Jul 2025 02:57:55 +0000 (19:57 -0700)
committerTianling Shen <[email protected]>
Fri, 18 Jul 2025 14:20:20 +0000 (22:20 +0800)
Upstream backport.

Signed-off-by: Rosen Penev <[email protected]>
libs/libwebsockets/Makefile
libs/libwebsockets/patches/010-gcc15.patch [new file with mode: 0644]

index 2fe7927b2d2858d273343c93dce37c74799e4316..b93cd0b0e518fbd13e8ccc19006cd8a343201d99 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libwebsockets
 PKG_VERSION:=4.3.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
diff --git a/libs/libwebsockets/patches/010-gcc15.patch b/libs/libwebsockets/patches/010-gcc15.patch
new file mode 100644 (file)
index 0000000..4635c59
--- /dev/null
@@ -0,0 +1,22 @@
+From 19bd6a5bf8e06e5bfa3b331e0aa8c6f9fa7e3459 Mon Sep 17 00:00:00 2001
+From: Andy Green <[email protected]>
+Date: Mon, 7 Jul 2025 14:03:49 +0100
+Subject: [PATCH] ssh: set correct lengths for sigma and tau
+
+---
+ plugins/ssh-base/crypto/chacha.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/plugins/ssh-base/crypto/chacha.c
++++ b/plugins/ssh-base/crypto/chacha.c
+@@ -59,8 +59,8 @@ typedef struct chacha_ctx chacha_ctx;
+   a = PLUS(a,b); d = ROTATE(XOR(d,a), 8); \
+   c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
+-static const char sigma[16] = "expand 32-byte k";
+-static const char tau[16] = "expand 16-byte k";
++static const char sigma[17] = "expand 32-byte k";
++static const char tau[17] = "expand 16-byte k";
+ void
+ chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits)